<?PHP

$post=$_POST;

if($_POST['delete']=='delete')
{
	mp('Deleted Item');
	deletesql($table,$id,$_POST['id']);
	$_POST['cmd']='';
	$_GET['cmd']='add';
}
else if($_POST['cmd']=='add' && !empty($_POST[$catch]))
{
	$post=process_default_serialized_values($post);
	process_sql_post($post,$table,'add',NULL,NULL);
	printmessage('Successfully Added');
}
else if($_POST['cmd']=='edit')
{
		$post=process_default_serialized_values($post);
		//rp($post);
		process_sql_post($post,$table,'update',$id,$_GET[$id]);
		printmessage('Successfully Modified');
}

	if($_GET['cmd']=='edit' && isset($_GET[$id]))
	{
		$e=get_data_form($table,$id);
		
		if($e['serial'] == 'N;' || empty($e['serial']) )
		{
		
				
		}
		else
		{
				$serial=unserialize($e['serial']);
				$e=array_merge($e,$serial);	
		}

	}

?>